<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Main extends CI_Controller {

	function __construct()
    {
		// Call the Model constructor
        parent::__construct();
		
		if($this->session->userdata('login') === FALSE || $this->session->userdata('group') != '1')
			redirect(base_url());
    }
	
	public function index()
	{
		$sub_view['sub'] = $this->load->view('admin/dashboard','',TRUE);
		$view['content'] = $this->load->view('admin/frame',$sub_view,TRUE);
		$this->load->view('index',$view);
	}
}
